<template>
	<el-table ref="multipleTable" :data="studentList" tooltip-effect="dark" style="width: 100%;overflow: auto;height: 18.75rem;"
	 @selection-change="handleSelectionChange" :header-cell-style="{'background-color': '#f2f4f7'}" :cell-style="{padding:'20px 0'}">
		<el-table-column type="selection">
		</el-table-column>
		<el-table-column label="姓名">
			<template slot-scope="scope">{{ scope.row.studentName }}</template>
		</el-table-column>
		<el-table-column prop="studentNum" label="学号">
		</el-table-column>
		<el-table-column prop="collegeName" label="院系">
		</el-table-column>
		<el-table-column prop="majorName" label="专业">
		</el-table-column>
		<el-table-column prop="schoolName" label="学校">
		</el-table-column>

	</el-table>
</template>

<script>
	export default {
		data() {
			return {
				tableData: [],
				multipleSelection: [],
				// 表单数据
				formData: {
					// 上级文件夹id，默认全部文件最上层为0
					id: 0,
					// 搜索框内容
					search: '',
					// 是否逆序
					reverse: false
				},
				newClassMask: false,
				addstudent: false,
				activeName: 'first'
			}

		},
		props: {
			studentList: Array
		},
		methods: {
			// 获取文件列表
			async getFiles() {
				// 清空被选中文件id列表
				this.checkedList = []
				console.log('获取文件列表')
				// params参数：文件夹id、搜索的值、是否逆序
				// this.files = await axios.get('/files', { params: this.formData })
			},
			handleSelectionChange(list) {
				console.log(list);
				this.multipleSelection.length = 0;
				for (let i = 0; i < list.length; i++) {
					this.multipleSelection.push(list[i].userPhone);
				}
				this.$emit("SendMessge",this.multipleSelection);
			},
			handleClose() {
				this.addstudent = false
			},
			handleClick(tab, event) {
				console.log(tab, event);
			}

		}


	}
</script>


<style>
</style>
